package com.example.smartf.tool;

import com.example.smartf.config.SpringMultipartEncoder;
import com.example.smartf.model.PyEntity;
import feign.Headers;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.awt.*;


@FeignClient(url = "http://localhost:5000",name = "pythonServer",configuration = SpringMultipartEncoder.class)
public interface PythonServer {
    @RequestMapping(value = "/trainmodel",method = RequestMethod.PUT,consumes="application/json")
    void trainmodel(PyEntity pyEntity);

    @RequestMapping(value = "/dealexcel",method = RequestMethod.POST)
    String dealExcel(@RequestParam("filename") String filename);

    //@Headers("Content-Type:multipart/form-data")
//    @RequestMapping(value = "/file",method = RequestMethod.POST,consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
//    String file(@RequestPart("file") MultipartFile file);
}

